package com.dhsc.local.dao.impl.qsjk;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.dhsc.domain.jkzx.qsjk.TQsjkrwLsVo;
import com.dhsc.domain.jkzx.qsjk.TQsjkrwTzVo;
import com.dhsc.domain.jkzx.qsjk.TQsjkrwVo;
import com.dhsc.local.dao.qsjk.ITQsjkDao;

@Repository("tqsjkdao")
public class TQsjkDaoImpl implements ITQsjkDao{
	
	@Autowired
    private SqlSessionTemplate localSqlSessionTemplate;

	@Override
	public List<TQsjkrwVo> queryTQsjkrw(TQsjkrwVo q) {
		return localSqlSessionTemplate.selectList("TQsjkMapper.queryTQsjkrw", q);
	}

	@Override
	public int insertTQsjkrw(TQsjkrwVo q) {
		return localSqlSessionTemplate.insert("TQsjkMapper.insertTQsjkrw", q);
	}

	@Override
	public int updateTQsjkrw(TQsjkrwVo q) {
		return localSqlSessionTemplate.update("TQsjkMapper.updateTQsjkrw", q);
	}
	
	@Override
	public int updateTQsjkrwQybz(TQsjkrwVo q) {
		return localSqlSessionTemplate.update("TQsjkMapper.updateTQsjkrwQybz", q);
	}

	@Override
	public int delTQsjkrw(TQsjkrwVo q) {
		return localSqlSessionTemplate.update("TQsjkMapper.delTQsjkrw", q);
	}

	@Override
	public int queryTQsjkrwHave(TQsjkrwVo q) {
		return localSqlSessionTemplate.selectOne("TQsjkMapper.queryTQsjkrwHave", q);
	}

	@Override
	public int insertTQsjkrwLs(TQsjkrwVo q) {
		return localSqlSessionTemplate.insert("TQsjkMapper.insertTQsjkrwLs", q);
	}

	@Override
	public int updateTQsjkrwLastLs(TQsjkrwVo q) {
		return localSqlSessionTemplate.update("TQsjkMapper.updateTQsjkrwLastLs", q);
	}

	@Override
	public int insertTQsjkrwTz(List<TQsjkrwTzVo> list) {
		return localSqlSessionTemplate.insert("TQsjkMapper.insertTQsjkrwTz", list);
	}

	@Override
	public int updateTQsjkrwLast() {
		return localSqlSessionTemplate.update("TQsjkMapper.updateTQsjkrwLast");
	}

	@Override
	public List<TQsjkrwLsVo> queryTQsjkrwLs(TQsjkrwLsVo t) {
		return localSqlSessionTemplate.selectList("TQsjkMapper.queryTQsjkrwLs", t);
	}
}
